.class public Lcom/nemustech/regina/RUtils;
.super Ljava/lang/Object;
.source "RUtils.java"


# static fields
.field public static final BUILD_TYPE_MANUFACTURER:I = 0x1

.field public static final BUILD_TYPE_MODEL:I = 0x2

.field public static final INTENT_TYPE_CONTACTS:I = 0x1

.field public static final INTENT_TYPE_SETTINGS:I = 0x2

.field private static final TAG:Ljava/lang/String; = "RUtils"

.field private static mToast:Landroid/widget/Toast;

.field private static sCanvas:Landroid/graphics/Canvas;

.field private static sIconSize:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 59
    new-instance v0, Landroid/graphics/Canvas;

    invoke-direct {v0}, Landroid/graphics/Canvas;-><init>()V

    sput-object v0, Lcom/nemustech/regina/RUtils;->sCanvas:Landroid/graphics/Canvas;

    .line 60
    const/4 v0, 0x0

    sput-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    .line 62
    const/4 v0, -0x1

    sput v0, Lcom/nemustech/regina/RUtils;->sIconSize:I

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 53
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static _convertTo2DPosX(Landroid/content/Context;F)F
    .locals 3
    .parameter "c"
    .parameter "x"

    .prologue
    .line 143
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->prvConverTo2DSize(Landroid/content/Context;F)F

    move-result v0

    .line 144
    .local v0, rasterX:F
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v1

    int-to-float v1, v1

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    add-float/2addr v1, v0

    return v1
.end method

.method public static _convertTo2DPosY(Landroid/content/Context;F)F
    .locals 3
    .parameter "c"
    .parameter "y"

    .prologue
    .line 149
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->prvConverTo2DSize(Landroid/content/Context;F)F

    move-result v0

    .line 150
    .local v0, rasterY:F
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v1

    int-to-float v1, v1

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    sub-float/2addr v1, v0

    return v1
.end method

.method public static calcCorrectionRatio(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;FF)F
    .locals 5
    .parameter "c"
    .parameter "world"
    .parameter "distanceFromStartingPoiont"
    .parameter "targetZ"

    .prologue
    .line 90
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFWorld;->getCamera()Lcom/nemustech/tiffany/world/TFCamera;

    move-result-object v3

    const/4 v4, 0x2

    invoke-virtual {v3, v4}, Lcom/nemustech/tiffany/world/TFCamera;->getLocation(I)F

    move-result v3

    sub-float v0, v3, p2

    .line 91
    .local v0, cameraLocationZ:F
    sub-float v1, v0, p3

    .line 92
    .local v1, distance:F
    div-float v2, v1, v0

    .line 93
    .local v2, ratio:F
    return v2
.end method

.method public static calcRealWorldFactor(Lcom/nemustech/tiffany/world/TFWorld;F)F
    .locals 5
    .parameter "world"
    .parameter "z"

    .prologue
    .line 81
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFWorld;->getViewWidth()I

    move-result v2

    .line 82
    .local v2, screenWidth:I
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFWorld;->getViewHeight()I

    move-result v1

    .line 84
    .local v1, screenHeight:I
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFWorld;->getCamera()Lcom/nemustech/tiffany/world/TFCamera;

    move-result-object v3

    const/4 v4, 0x2

    invoke-virtual {v3, v4}, Lcom/nemustech/tiffany/world/TFCamera;->getLocation(I)F

    move-result v3

    sub-float/2addr v3, p1

    invoke-static {p0, v2, v1, v3}, Lcom/nemustech/tiffany/world/TFUtils;->calcRealWorldFactor(Lcom/nemustech/tiffany/world/TFWorld;IIF)F

    move-result v0

    .line 86
    .local v0, factor:F
    return v0
.end method

.method public static convertDrawableToBitmap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;
    .locals 6
    .parameter "dw"

    .prologue
    const/4 v5, 0x0

    .line 339
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v2

    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v2, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 340
    .local v0, bitmap:Landroid/graphics/Bitmap;
    sget-object v1, Lcom/nemustech/regina/RUtils;->sCanvas:Landroid/graphics/Canvas;

    .line 341
    .local v1, canvas:Landroid/graphics/Canvas;
    invoke-virtual {v1, v0}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 342
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v2

    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    invoke-virtual {p0, v5, v5, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 343
    invoke-virtual {p0, v1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 344
    return-object v0
.end method

.method public static convertIntArrayToString([I)Ljava/lang/String;
    .locals 4
    .parameter "arr"

    .prologue
    .line 385
    const/4 v0, 0x0

    .line 386
    .local v0, append:Z
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    .line 387
    .local v2, strPass:Ljava/lang/StringBuilder;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    array-length v3, p0

    if-ge v1, v3, :cond_0

    .line 388
    aget v3, p0, v1

    if-nez v3, :cond_1

    .line 396
    :cond_0
    if-eqz v0, :cond_2

    .line 397
    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 400
    :goto_1
    return-object v3

    .line 391
    :cond_1
    aget v3, p0, v1

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 392
    const/4 v0, 0x1

    .line 387
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 400
    :cond_2
    const-string v3, ""

    goto :goto_1
.end method

.method public static convertPixelByDensity(Landroid/content/Context;I)I
    .locals 1
    .parameter "c"
    .parameter "pixel"

    .prologue
    .line 564
    invoke-static {p1}, Lcom/nemustech/regina/RUtils;->toDip(I)F

    move-result v0

    invoke-static {p0, v0}, Lcom/nemustech/regina/RUtils;->toPixel(Landroid/content/Context;F)I

    move-result v0

    return v0
.end method

.method public static convertTo2DPosX(Landroid/content/Context;F)I
    .locals 2
    .parameter "c"
    .parameter "x"

    .prologue
    .line 155
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->_convertTo2DPosX(Landroid/content/Context;F)F

    move-result v0

    const/high16 v1, 0x3f00

    add-float/2addr v0, v1

    float-to-int v0, v0

    return v0
.end method

.method public static convertTo2DPosY(Landroid/content/Context;F)I
    .locals 2
    .parameter "c"
    .parameter "y"

    .prologue
    .line 160
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->_convertTo2DPosY(Landroid/content/Context;F)F

    move-result v0

    const/high16 v1, 0x3f00

    add-float/2addr v0, v1

    float-to-int v0, v0

    return v0
.end method

.method public static convertTo2DSize(Landroid/content/Context;F)I
    .locals 2
    .parameter "c"
    .parameter "size"

    .prologue
    .line 139
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->prvConverTo2DSize(Landroid/content/Context;F)F

    move-result v0

    const/high16 v1, 0x3f00

    add-float/2addr v0, v1

    float-to-int v0, v0

    return v0
.end method

.method public static convertTo3DPosX(Landroid/content/Context;I)F
    .locals 4
    .parameter "c"
    .parameter "x"

    .prologue
    .line 97
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v2

    int-to-float v0, v2

    .line 98
    .local v0, screenWidth:F
    int-to-float v2, p1

    div-float/2addr v2, v0

    const/high16 v3, 0x3f00

    sub-float v1, v2, v3

    .line 99
    .local v1, tiffanyX:F
    return v1
.end method

.method public static convertTo3DPosX(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F
    .locals 5
    .parameter "c"
    .parameter "world"
    .parameter "x"
    .parameter "z"

    .prologue
    .line 104
    invoke-static {p0, p2}, Lcom/nemustech/regina/RUtils;->convertTo3DPosX(Landroid/content/Context;I)F

    move-result v1

    .line 105
    .local v1, tiffanyX:F
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFWorld;->getViewWidth()I

    move-result v2

    int-to-float v2, v2

    const/high16 v3, 0x3f80

    invoke-static {p1, p3}, Lcom/nemustech/regina/RUtils;->calcRealWorldFactor(Lcom/nemustech/tiffany/world/TFWorld;F)F

    move-result v4

    div-float/2addr v3, v4

    div-float v0, v2, v3

    .line 106
    .local v0, factor:F
    mul-float/2addr v1, v0

    .line 107
    return v1
.end method

.method public static convertTo3DPosY(Landroid/content/Context;I)F
    .locals 3
    .parameter "c"
    .parameter "y"

    .prologue
    .line 112
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v1

    .line 113
    .local v1, ySize:F
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v2

    div-int/lit8 v2, v2, 0x2

    invoke-static {p0, v2}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v0

    .line 114
    .local v0, yLength:F
    sub-float v2, v0, v1

    return v2
.end method

.method public static convertTo3DPosY(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F
    .locals 5
    .parameter "c"
    .parameter "world"
    .parameter "y"
    .parameter "z"

    .prologue
    .line 118
    invoke-static {p0, p2}, Lcom/nemustech/regina/RUtils;->convertTo3DPosY(Landroid/content/Context;I)F

    move-result v1

    .line 119
    .local v1, tiffanyY:F
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFWorld;->getViewWidth()I

    move-result v2

    int-to-float v2, v2

    const/high16 v3, 0x3f80

    invoke-static {p1, p3}, Lcom/nemustech/regina/RUtils;->calcRealWorldFactor(Lcom/nemustech/tiffany/world/TFWorld;F)F

    move-result v4

    div-float/2addr v3, v4

    div-float v0, v2, v3

    .line 120
    .local v0, factor:F
    mul-float/2addr v1, v0

    .line 121
    return v1
.end method

.method public static convertTo3DSize(Landroid/content/Context;F)F
    .locals 3
    .parameter "c"
    .parameter "size"

    .prologue
    .line 130
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v0

    .line 131
    .local v0, screenWidth:I
    const/high16 v1, 0x3f80

    mul-float/2addr v1, p1

    int-to-float v2, v0

    div-float/2addr v1, v2

    return v1
.end method

.method public static convertTo3DSize(Landroid/content/Context;I)F
    .locals 3
    .parameter "c"
    .parameter "size"

    .prologue
    .line 125
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v0

    .line 126
    .local v0, screenWidth:I
    const/high16 v1, 0x3f80

    int-to-float v2, p1

    mul-float/2addr v1, v2

    int-to-float v2, v0

    div-float/2addr v1, v2

    return v1
.end method

.method public static copyFile(Ljava/io/File;Ljava/io/File;)V
    .locals 6
    .parameter "src"
    .parameter "dst"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 499
    new-instance v1, Ljava/io/FileInputStream;

    invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    invoke-virtual {v1}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;

    move-result-object v0

    .line 500
    .local v0, inChannel:Ljava/nio/channels/FileChannel;
    new-instance v1, Ljava/io/FileOutputStream;

    invoke-direct {v1, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    invoke-virtual {v1}, Ljava/io/FileOutputStream;->getChannel()Ljava/nio/channels/FileChannel;

    move-result-object v5

    .line 503
    .local v5, outChannel:Ljava/nio/channels/FileChannel;
    const-wide/16 v1, 0x0

    :try_start_0
    invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->size()J

    move-result-wide v3

    invoke-virtual/range {v0 .. v5}, Ljava/nio/channels/FileChannel;->transferTo(JJLjava/nio/channels/WritableByteChannel;)J
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 506
    if-eqz v0, :cond_0

    .line 507
    invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->close()V

    .line 508
    :cond_0
    if-eqz v5, :cond_1

    .line 509
    invoke-virtual {v5}, Ljava/nio/channels/FileChannel;->close()V

    .line 511
    :cond_1
    return-void

    .line 506
    :catchall_0
    move-exception v1

    if-eqz v0, :cond_2

    .line 507
    invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->close()V

    .line 508
    :cond_2
    if-eqz v5, :cond_3

    .line 509
    invoke-virtual {v5}, Ljava/nio/channels/FileChannel;->close()V

    :cond_3
    throw v1
.end method

.method public static copyFiles(Ljava/io/File;Ljava/io/File;)Z
    .locals 5
    .parameter "sourceLocation"
    .parameter "targetLocation"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 519
    invoke-virtual {p0, p1}, Ljava/io/File;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    const/4 v2, 0x0

    .line 533
    :goto_0
    return v2

    .line 521
    :cond_0
    invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z

    move-result v2

    if-eqz v2, :cond_2

    .line 522
    invoke-virtual {p1}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    .line 523
    invoke-virtual {p1}, Ljava/io/File;->mkdir()Z

    .line 525
    :cond_1
    invoke-virtual {p0}, Ljava/io/File;->list()[Ljava/lang/String;

    move-result-object v0

    .line 526
    .local v0, children:[Ljava/lang/String;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_1
    array-length v2, v0

    if-ge v1, v2, :cond_3

    .line 527
    new-instance v2, Ljava/io/File;

    aget-object v3, v0, v1

    invoke-direct {v2, p0, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    new-instance v3, Ljava/io/File;

    aget-object v4, v0, v1

    invoke-direct {v3, p1, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-static {v2, v3}, Lcom/nemustech/regina/RUtils;->copyFiles(Ljava/io/File;Ljava/io/File;)Z

    .line 526
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 530
    .end local v0           #children:[Ljava/lang/String;
    .end local v1           #i:I
    :cond_2
    invoke-virtual {p0}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_3

    .line 531
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->copyFile(Ljava/io/File;Ljava/io/File;)V

    .line 533
    :cond_3
    const/4 v2, 0x1

    goto :goto_0
.end method

.method public static copyFiles(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 2
    .parameter "sourcePath"
    .parameter "targetPath"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 514
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v0, v1}, Lcom/nemustech/regina/RUtils;->copyFiles(Ljava/io/File;Ljava/io/File;)Z

    move-result v0

    return v0
.end method

.method public static createIconThumbnail(Landroid/content/Context;Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;
    .locals 14
    .parameter "context"
    .parameter "icon"

    .prologue
    .line 284
    sget v11, Lcom/nemustech/regina/RUtils;->sIconSize:I

    const/4 v12, -0x1

    if-ne v11, v12, :cond_0

    .line 285
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->setInitIconSize(Landroid/content/Context;)V

    .line 288
    :cond_0
    sget-object v11, Lcom/nemustech/regina/RUtils;->sCanvas:Landroid/graphics/Canvas;

    monitor-enter v11

    .line 292
    :try_start_0
    sget v10, Lcom/nemustech/regina/RUtils;->sIconSize:I

    .line 293
    .local v10, width:I
    sget v4, Lcom/nemustech/regina/RUtils;->sIconSize:I

    .line 295
    .local v4, height:I
    instance-of v12, p1, Landroid/graphics/drawable/PaintDrawable;

    if-eqz v12, :cond_4

    .line 296
    move-object v0, p1

    check-cast v0, Landroid/graphics/drawable/PaintDrawable;

    move-object v6, v0

    .line 297
    .local v6, painter:Landroid/graphics/drawable/PaintDrawable;
    invoke-virtual {v6, v10}, Landroid/graphics/drawable/PaintDrawable;->setIntrinsicWidth(I)V

    .line 298
    invoke-virtual {v6, v4}, Landroid/graphics/drawable/PaintDrawable;->setIntrinsicHeight(I)V

    .line 307
    .end local v6           #painter:Landroid/graphics/drawable/PaintDrawable;
    :cond_1
    :goto_0
    invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v9

    .line 308
    .local v9, sourceWidth:I
    invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v8

    .line 310
    .local v8, sourceHeight:I
    if-lez v9, :cond_3

    if-lez v9, :cond_3

    .line 312
    if-lt v10, v9, :cond_2

    if-ge v4, v8, :cond_6

    .line 314
    :cond_2
    int-to-float v12, v9

    int-to-float v13, v8

    div-float v7, v12, v13

    .line 315
    .local v7, ratio:F
    if-le v9, v8, :cond_5

    .line 316
    int-to-float v12, v10

    div-float/2addr v12, v7

    float-to-int v4, v12

    .line 327
    .end local v7           #ratio:F
    :cond_3
    :goto_1
    sget-object v12, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v10, v4, v12}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 328
    .local v1, bitmap:Landroid/graphics/Bitmap;
    sget-object v3, Lcom/nemustech/regina/RUtils;->sCanvas:Landroid/graphics/Canvas;

    .line 329
    .local v3, canvas:Landroid/graphics/Canvas;
    invoke-virtual {v3, v1}, Landroid/graphics/Canvas;->setBitmap(Landroid/graphics/Bitmap;)V

    .line 330
    invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->getBounds()Landroid/graphics/Rect;

    move-result-object v5

    .line 331
    .local v5, oldRect:Landroid/graphics/Rect;
    const/4 v12, 0x0

    const/4 v13, 0x0

    invoke-virtual {p1, v12, v13, v10, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 332
    invoke-virtual {p1, v3}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 333
    invoke-virtual {p1, v5}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V

    .line 334
    monitor-exit v11

    return-object v1

    .line 299
    .end local v1           #bitmap:Landroid/graphics/Bitmap;
    .end local v3           #canvas:Landroid/graphics/Canvas;
    .end local v5           #oldRect:Landroid/graphics/Rect;
    .end local v8           #sourceHeight:I
    .end local v9           #sourceWidth:I
    :cond_4
    instance-of v12, p1, Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v12, :cond_1

    .line 301
    move-object v0, p1

    check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

    move-object v2, v0

    .line 302
    .local v2, bitmapDrawable:Landroid/graphics/drawable/BitmapDrawable;
    invoke-virtual {v2}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v1

    .line 303
    .restart local v1       #bitmap:Landroid/graphics/Bitmap;
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getDensity()I

    move-result v12

    if-nez v12, :cond_1

    .line 304
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v12

    invoke-virtual {v12}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v12

    invoke-virtual {v2, v12}, Landroid/graphics/drawable/BitmapDrawable;->setTargetDensity(Landroid/util/DisplayMetrics;)V

    goto :goto_0

    .line 335
    .end local v1           #bitmap:Landroid/graphics/Bitmap;
    .end local v2           #bitmapDrawable:Landroid/graphics/drawable/BitmapDrawable;
    .end local v4           #height:I
    .end local v10           #width:I
    :catchall_0
    move-exception v12

    monitor-exit v11
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v12

    .line 317
    .restart local v4       #height:I
    .restart local v7       #ratio:F
    .restart local v8       #sourceHeight:I
    .restart local v9       #sourceWidth:I
    .restart local v10       #width:I
    :cond_5
    if-le v8, v9, :cond_3

    .line 318
    int-to-float v12, v4

    mul-float/2addr v12, v7

    float-to-int v10, v12

    goto :goto_1

    .line 320
    .end local v7           #ratio:F
    :cond_6
    if-ge v9, v10, :cond_3

    if-ge v8, v4, :cond_3

    .line 322
    move v10, v9

    .line 323
    move v4, v8

    goto :goto_1
.end method

.method public static decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;
    .locals 1
    .parameter "resources"
    .parameter "resourceID"

    .prologue
    .line 551
    invoke-static {p0, p1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    return-object v0
.end method

.method public static deleteFiles(Ljava/lang/String;Ljava/io/FilenameFilter;)V
    .locals 8
    .parameter "deletePath"
    .parameter "filter"

    .prologue
    const/4 v7, 0x1

    .line 537
    if-eqz p0, :cond_1

    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v6

    if-lez v6, :cond_1

    .line 538
    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 539
    .local v4, path:Ljava/io/File;
    invoke-virtual {v4, p1}, Ljava/io/File;->listFiles(Ljava/io/FilenameFilter;)[Ljava/io/File;

    move-result-object v5

    .line 540
    .local v5, pathFiles:[Ljava/io/File;
    if-eqz v5, :cond_1

    array-length v6, v5

    if-lez v6, :cond_1

    .line 541
    move-object v0, v5

    .local v0, arr$:[Ljava/io/File;
    array-length v3, v0

    .local v3, len$:I
    const/4 v2, 0x0

    .local v2, i$:I
    :goto_0
    if-ge v2, v3, :cond_1

    aget-object v1, v0, v2

    .line 542
    .local v1, f:Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->isFile()Z

    move-result v6

    if-ne v6, v7, :cond_0

    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v6

    if-ne v6, v7, :cond_0

    .line 543
    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    .line 541
    :cond_0
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 548
    .end local v0           #arr$:[Ljava/io/File;
    .end local v1           #f:Ljava/io/File;
    .end local v2           #i$:I
    .end local v3           #len$:I
    .end local v4           #path:Ljava/io/File;
    .end local v5           #pathFiles:[Ljava/io/File;
    :cond_1
    return-void
.end method

.method public static drawHLine(Landroid/content/Context;Landroid/graphics/Bitmap;III)V
    .locals 11
    .parameter "c"
    .parameter "bmp"
    .parameter "x"
    .parameter "y"
    .parameter "length"

    .prologue
    const/4 v10, 0x0

    .line 250
    new-instance v0, Landroid/graphics/Canvas;

    invoke-direct {v0, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 251
    .local v0, canvas:Landroid/graphics/Canvas;
    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    .line 253
    .local v4, paint:Landroid/graphics/Paint;
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    .line 258
    .local v5, r:Landroid/content/res/Resources;
    const v7, 0x7f02004a

    invoke-static {v5, v7}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 259
    .local v1, left:Landroid/graphics/Bitmap;
    const v7, 0x7f02004b

    invoke-static {v5, v7}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 260
    .local v2, middle:Landroid/graphics/Bitmap;
    const v7, 0x7f02004c

    invoke-static {v5, v7}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v6

    .line 263
    .local v6, right:Landroid/graphics/Bitmap;
    invoke-virtual {v6}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v7

    sub-int v3, p4, v7

    .line 265
    .local v3, middleEnd:I
    int-to-float v7, p2

    int-to-float v8, p3

    invoke-virtual {v0, v1, v7, v8, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 266
    new-instance v7, Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v8

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v9

    invoke-direct {v7, v10, v10, v8, v9}, Landroid/graphics/Rect;-><init>(IIII)V

    new-instance v8, Landroid/graphics/Rect;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v9

    add-int/2addr v9, p2

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v10

    add-int/2addr v10, p3

    invoke-direct {v8, v9, p3, v3, v10}, Landroid/graphics/Rect;-><init>(IIII)V

    invoke-virtual {v0, v2, v7, v8, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 270
    int-to-float v7, v3

    int-to-float v8, p3

    invoke-virtual {v0, v6, v7, v8, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 271
    return-void
.end method

.method public static existBackupFile(Landroid/content/Context;)Z
    .locals 5
    .parameter "c"

    .prologue
    .line 465
    new-instance v0, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v3

    const-string v4, "regina_launcher.db"

    invoke-direct {v0, v3, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 466
    .local v0, externalDBFile:Ljava/io/File;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const v4, 0x7f070001

    invoke-virtual {p0, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ".xml"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 467
    .local v2, prefName:Ljava/lang/String;
    new-instance v1, Ljava/io/File;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v3

    invoke-direct {v1, v3, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 469
    .local v1, externalPrefFile:Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_1

    .line 470
    :cond_0
    const/4 v3, 0x0

    .line 473
    :goto_0
    return v3

    :cond_1
    const/4 v3, 0x1

    goto :goto_0
.end method

.method public static existPackage(Landroid/content/pm/PackageManager;Ljava/lang/String;I)Z
    .locals 2
    .parameter "pm"
    .parameter "packageName"
    .parameter "flags"

    .prologue
    .line 453
    :try_start_0
    invoke-virtual {p0, p1, p2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 458
    const/4 v1, 0x1

    :goto_0
    return v1

    .line 454
    :catch_0
    move-exception v0

    .line 455
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public static forceStopPackage(Landroid/content/Context;Ljava/lang/String;)V
    .locals 3
    .parameter "c"
    .parameter "packageName"

    .prologue
    .line 686
    const-string v1, "activity"

    invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 687
    .local v0, am:Landroid/app/ActivityManager;
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x9

    if-ge v1, v2, :cond_0

    .line 689
    invoke-virtual {v0, p1}, Landroid/app/ActivityManager;->restartPackage(Ljava/lang/String;)V

    .line 694
    :goto_0
    return-void

    .line 692
    :cond_0
    invoke-virtual {v0, p1}, Landroid/app/ActivityManager;->killBackgroundProcesses(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public static formatDate(Ljava/util/Date;I)Ljava/lang/String;
    .locals 5
    .parameter "date"
    .parameter "style"

    .prologue
    .line 230
    move-object v0, p0

    .line 231
    .local v0, aDate:Ljava/util/Date;
    if-nez v0, :cond_0

    .line 232
    new-instance v0, Ljava/util/Date;

    .end local v0           #aDate:Ljava/util/Date;
    invoke-direct {v0}, Ljava/util/Date;-><init>()V

    .line 233
    .restart local v0       #aDate:Ljava/util/Date;
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v1

    .line 234
    .local v1, c:Ljava/util/Calendar;
    const/4 v3, 0x1

    invoke-virtual {v1, v3}, Ljava/util/Calendar;->get(I)I

    move-result v3

    const/16 v4, 0x76c

    sub-int/2addr v3, v4

    invoke-virtual {v0, v3}, Ljava/util/Date;->setYear(I)V

    .line 235
    const/4 v3, 0x2

    invoke-virtual {v1, v3}, Ljava/util/Calendar;->get(I)I

    move-result v3

    invoke-virtual {v0, v3}, Ljava/util/Date;->setMonth(I)V

    .line 236
    const/4 v3, 0x5

    invoke-virtual {v1, v3}, Ljava/util/Calendar;->get(I)I

    move-result v3

    invoke-virtual {v0, v3}, Ljava/util/Date;->setDate(I)V

    .line 238
    .end local v1           #c:Ljava/util/Calendar;
    :cond_0
    invoke-static {}, Lcom/nemustech/regina/ResourceCare;->getLocale()Ljava/util/Locale;

    move-result-object v3

    invoke-static {p1, v3}, Ljava/text/DateFormat;->getDateInstance(ILjava/util/Locale;)Ljava/text/DateFormat;

    move-result-object v2

    .line 239
    .local v2, df:Ljava/text/DateFormat;
    invoke-virtual {v2, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v3

    return-object v3
.end method

.method public static formatDate(Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter "date"
    .parameter "pattern"

    .prologue
    .line 243
    new-instance v0, Ljava/text/SimpleDateFormat;

    invoke-static {}, Lcom/nemustech/regina/ResourceCare;->getLocale()Ljava/util/Locale;

    move-result-object v2

    invoke-direct {v0, p1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    .line 244
    .local v0, formatter:Ljava/text/SimpleDateFormat;
    invoke-virtual {v0, p0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    .line 245
    .local v1, s:Ljava/lang/String;
    return-object v1
.end method

.method public static getBuildInfo(I)Ljava/lang/String;
    .locals 1
    .parameter "type"

    .prologue
    .line 433
    const/4 v0, 0x0

    .line 435
    .local v0, result:Ljava/lang/String;
    packed-switch p0, :pswitch_data_0

    .line 444
    :goto_0
    return-object v0

    .line 437
    :pswitch_0
    sget-object v0, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    .line 439
    :pswitch_1
    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    goto :goto_0

    .line 435
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static getDefaultIcon(Landroid/content/Context;)Landroid/graphics/drawable/Drawable;
    .locals 1
    .parameter "c"

    .prologue
    .line 164
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    return-object v0
.end method

.method public static getEllipsisString(Ljava/lang/String;Landroid/graphics/Paint;I)Ljava/lang/String;
    .locals 7
    .parameter "str"
    .parameter "paint"
    .parameter "maxWidth"

    .prologue
    const/4 v6, 0x0

    .line 372
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    .line 373
    .local v1, bound:Landroid/graphics/Rect;
    const-string v0, ".."

    .line 374
    .local v0, ELLIPSIS:Ljava/lang/String;
    const-string v3, ".."

    const/4 v4, 0x2

    invoke-virtual {p1, v3, v6, v4, v1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 376
    const/4 v3, 0x1

    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v4

    sub-int v4, p2, v4

    int-to-float v4, v4

    const/4 v5, 0x0

    invoke-virtual {p1, p0, v3, v4, v5}, Landroid/graphics/Paint;->breakText(Ljava/lang/String;ZF[F)I

    move-result v2

    .line 378
    .local v2, filteredLen:I
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v3

    if-eq v2, v3, :cond_0

    .line 379
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0, v6, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ".."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 381
    :goto_0
    return-object v3

    :cond_0
    move-object v3, p0

    goto :goto_0
.end method

.method public static getIntentByType(Landroid/content/Context;Landroid/content/Intent;I)Z
    .locals 2
    .parameter "c"
    .parameter "emptyIntent"
    .parameter "type"

    .prologue
    .line 617
    const/4 v0, 0x0

    .line 619
    .local v0, result:Z
    if-eqz p1, :cond_0

    .line 620
    packed-switch p2, :pswitch_data_0

    .line 633
    :cond_0
    :goto_0
    return v0

    .line 622
    :pswitch_0
    const-string v1, "android.intent.action.VIEW"

    invoke-virtual {p1, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 623
    const-string v1, "vnd.android.cursor.dir/contact"

    invoke-virtual {p1, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 624
    const/4 v0, 0x1

    .line 625
    goto :goto_0

    .line 627
    :pswitch_1
    const-string v1, "android.settings.SETTINGS"

    invoke-virtual {p1, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 628
    const/4 v0, 0x1

    goto :goto_0

    .line 620
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static getScreenHeightAvailable(Landroid/content/Context;)I
    .locals 3
    .parameter "c"

    .prologue
    .line 75
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 76
    .local v0, dm:Landroid/util/DisplayMetrics;
    iget v1, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    invoke-static {p0}, Lcom/nemustech/tiffany/world/TFUtils;->getStatusBarHeight(Landroid/content/Context;)I

    move-result v2

    sub-int/2addr v1, v2

    return v1
.end method

.method public static getScreenWidthAvailable(Landroid/content/Context;)I
    .locals 2
    .parameter "c"

    .prologue
    .line 70
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 71
    .local v0, dm:Landroid/util/DisplayMetrics;
    iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    return v1
.end method

.method public static getWallpaperFileName(Landroid/content/Context;I)Ljava/lang/String;
    .locals 6
    .parameter "c"
    .parameter "workspaceUID"

    .prologue
    .line 168
    move-object v0, p0

    check-cast v0, Lcom/nemustech/regina/ReginaLauncher;

    move-object v3, v0

    .line 169
    .local v3, mainActivity:Lcom/nemustech/regina/ReginaLauncher;
    invoke-virtual {v3}, Lcom/nemustech/regina/ReginaLauncher;->getReginaPref()Lcom/nemustech/regina/ReginaPreference;

    move-result-object v4

    .line 170
    .local v4, pref:Lcom/nemustech/regina/ReginaPreference;
    invoke-virtual {v4, p1}, Lcom/nemustech/regina/ReginaPreference;->getWallpaper(I)Ljava/lang/String;

    move-result-object v2

    .line 171
    .local v2, filename:Ljava/lang/String;
    if-eqz v2, :cond_0

    .line 172
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 173
    .local v1, file:Ljava/io/File;
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v5

    if-nez v5, :cond_0

    .line 174
    const/4 v2, 0x0

    .line 178
    .end local v1           #file:Ljava/io/File;
    :cond_0
    return-object v2
.end method

.method public static isInstalledApp(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Z
    .locals 5
    .parameter "c"
    .parameter "packageName"
    .parameter "className"

    .prologue
    const/4 v4, 0x0

    .line 576
    const/4 v1, 0x0

    .line 577
    .local v1, appSchIntent:Landroid/content/Intent;
    new-instance v1, Landroid/content/Intent;

    .end local v1           #appSchIntent:Landroid/content/Intent;
    const-string v2, "android.intent.action.MAIN"

    const/4 v3, 0x0

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 578
    .restart local v1       #appSchIntent:Landroid/content/Intent;
    invoke-virtual {v1, p1, p2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 579
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    invoke-virtual {v2, v1, v4}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;

    move-result-object v0

    .line 580
    .local v0, appList:Ljava/util/List;,"Ljava/util/List<Landroid/content/pm/ResolveInfo;>;"
    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v2

    if-nez v2, :cond_1

    :cond_0
    move v2, v4

    .line 583
    :goto_0
    return v2

    :cond_1
    const/4 v2, 0x1

    goto :goto_0
.end method

.method public static isSDCardMounted(Landroid/content/Context;)Z
    .locals 2
    .parameter "c"

    .prologue
    .line 489
    const-string v0, "mounted"

    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 490
    const/4 v0, 0x1

    .line 492
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isSDCardPrepared(Landroid/content/Context;)Z
    .locals 3
    .parameter "c"

    .prologue
    const/4 v2, 0x1

    .line 480
    const-string v0, "mounted"

    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 481
    const v0, 0x7f0700dd

    invoke-static {p0, v0, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 482
    const/4 v0, 0x0

    .line 485
    :goto_0
    return v0

    :cond_0
    move v0, v2

    goto :goto_0
.end method

.method public static logBuildInfo()V
    .locals 4

    .prologue
    .line 404
    const-string v0, "RUtils"

    const-string v1, "##### BUILD INFORMATION START #####"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 406
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### BOARD="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->BOARD:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 407
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### BRAND="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->BRAND:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 408
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### CPU_ABI="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->CPU_ABI:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 409
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### DEVICE="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->DEVICE:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 410
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### DISPLAY="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->DISPLAY:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 411
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### FINGERPRINT="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->FINGERPRINT:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 412
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### HOST="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->HOST:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 413
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### ID="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->ID:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 414
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### MANUFACTURER="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 415
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### MODEL="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->MODEL:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 416
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### PRODUCT="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->PRODUCT:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 417
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### TAGS="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->TAGS:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 418
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### TYPE="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->TYPE:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 419
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### USER="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build;->USER:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 420
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### TIME="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-wide v2, Landroid/os/Build;->TIME:J

    invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 423
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### VERSION.CODENAME="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build$VERSION;->CODENAME:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 424
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### VERSION.INCREMENTAL="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build$VERSION;->INCREMENTAL:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 425
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### VERSION.RELEASE="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 426
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### VERSION.SDK="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget-object v2, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 427
    const-string v0, "RUtils"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "##### VERSION.SDK_INT="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 429
    const-string v0, "RUtils"

    const-string v1, "##### BUILD INFORMATION E N D #####"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 430
    return-void
.end method

.method public static logHeap(Ljava/lang/Class;)V
    .locals 13
    .parameter "clazz"

    .prologue
    const/4 v12, 0x2

    const-wide/32 v10, 0x100000

    const-wide/high16 v8, 0x4130

    .line 671
    new-instance v4, Ljava/lang/Double;

    invoke-static {}, Landroid/os/Debug;->getNativeHeapAllocatedSize()J

    move-result-wide v5

    long-to-double v5, v5

    invoke-direct {v4, v5, v6}, Ljava/lang/Double;-><init>(D)V

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    new-instance v6, Ljava/lang/Double;

    invoke-direct {v6, v8, v9}, Ljava/lang/Double;-><init>(D)V

    invoke-virtual {v6}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v6

    div-double/2addr v4, v6

    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .line 672
    .local v0, allocated:Ljava/lang/Double;
    new-instance v1, Ljava/lang/Double;

    invoke-static {}, Landroid/os/Debug;->getNativeHeapSize()J

    move-result-wide v4

    long-to-double v4, v4

    div-double/2addr v4, v8

    invoke-direct {v1, v4, v5}, Ljava/lang/Double;-><init>(D)V

    .line 673
    .local v1, available:Ljava/lang/Double;
    new-instance v3, Ljava/lang/Double;

    invoke-static {}, Landroid/os/Debug;->getNativeHeapFreeSize()J

    move-result-wide v4

    long-to-double v4, v4

    div-double/2addr v4, v8

    invoke-direct {v3, v4, v5}, Ljava/lang/Double;-><init>(D)V

    .line 674
    .local v3, free:Ljava/lang/Double;
    new-instance v2, Ljava/text/DecimalFormat;

    invoke-direct {v2}, Ljava/text/DecimalFormat;-><init>()V

    .line 675
    .local v2, df:Ljava/text/DecimalFormat;
    invoke-virtual {v2, v12}, Ljava/text/DecimalFormat;->setMaximumFractionDigits(I)V

    .line 676
    invoke-virtual {v2, v12}, Ljava/text/DecimalFormat;->setMinimumFractionDigits(I)V

    .line 678
    const-string v4, "ReginaLauncher"

    const-string v5, "debug. ================================="

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 679
    const-string v4, "ReginaLauncher"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "debug.heap native: allocated "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v2, v0}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB of "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v2, v1}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB ("

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v2, v3}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB free) in ["

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v6

    const-string v7, "com.myapp.android."

    const-string v8, ""

    invoke-virtual {v6, v7, v8}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "]"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 680
    const-string v4, "ReginaLauncher"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "debug.memory: allocated: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    new-instance v6, Ljava/lang/Double;

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/Runtime;->totalMemory()J

    move-result-wide v7

    div-long/2addr v7, v10

    long-to-double v7, v7

    invoke-direct {v6, v7, v8}, Ljava/lang/Double;-><init>(D)V

    invoke-virtual {v2, v6}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB of "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    new-instance v6, Ljava/lang/Double;

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/Runtime;->maxMemory()J

    move-result-wide v7

    div-long/2addr v7, v10

    long-to-double v7, v7

    invoke-direct {v6, v7, v8}, Ljava/lang/Double;-><init>(D)V

    invoke-virtual {v2, v6}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB ("

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    new-instance v6, Ljava/lang/Double;

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/Runtime;->freeMemory()J

    move-result-wide v7

    div-long/2addr v7, v10

    long-to-double v7, v7

    invoke-direct {v6, v7, v8}, Ljava/lang/Double;-><init>(D)V

    invoke-virtual {v2, v6}, Ljava/text/DecimalFormat;->format(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "MB free)"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 681
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 682
    invoke-static {}, Ljava/lang/System;->gc()V

    .line 683
    return-void
.end method

.method public static logRectBitmap(Landroid/content/Context;Ljava/lang/Object;Landroid/graphics/RectF;Landroid/graphics/RectF;)V
    .locals 7
    .parameter "c"
    .parameter "o"
    .parameter "rt1"
    .parameter "rt2"

    .prologue
    .line 651
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v0

    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenHeightAvailable(Landroid/content/Context;)I

    move-result v1

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 652
    .local v0, bitmap:Landroid/graphics/Bitmap;
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 653
    .local v1, canvas:Landroid/graphics/Canvas;
    new-instance v2, Landroid/graphics/Paint;

    const/4 v3, 0x1

    invoke-direct {v2, v3}, Landroid/graphics/Paint;-><init>(I)V

    .line 655
    .local v2, paint:Landroid/graphics/Paint;
    new-instance v3, Landroid/graphics/Rect;

    iget v4, p2, Landroid/graphics/RectF;->left:F

    invoke-static {p0, v4}, Lcom/nemustech/regina/RUtils;->convertTo2DPosX(Landroid/content/Context;F)I

    move-result v4

    iget v5, p2, Landroid/graphics/RectF;->top:F

    invoke-static {p0, v5}, Lcom/nemustech/regina/RUtils;->convertTo2DPosY(Landroid/content/Context;F)I

    move-result v5

    iget v6, p2, Landroid/graphics/RectF;->right:F

    invoke-static {p0, v6}, Lcom/nemustech/regina/RUtils;->convertTo2DPosX(Landroid/content/Context;F)I

    move-result v6

    iget p2, p2, Landroid/graphics/RectF;->bottom:F

    .end local p2
    invoke-static {p0, p2}, Lcom/nemustech/regina/RUtils;->convertTo2DPosY(Landroid/content/Context;F)I

    move-result p2

    invoke-direct {v3, v4, v5, v6, p2}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 657
    .local v3, rect1:Landroid/graphics/Rect;
    const/16 p2, 0x64

    const/16 v4, 0xff

    const/4 v5, 0x0

    const/4 v6, 0x0

    invoke-static {p2, v4, v5, v6}, Landroid/graphics/Color;->argb(IIII)I

    move-result p2

    invoke-virtual {v2, p2}, Landroid/graphics/Paint;->setColor(I)V

    .line 658
    invoke-virtual {v1, v3, v2}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 659
    new-instance p2, Landroid/graphics/Rect;

    iget v3, p3, Landroid/graphics/RectF;->left:F

    .end local v3           #rect1:Landroid/graphics/Rect;
    invoke-static {p0, v3}, Lcom/nemustech/regina/RUtils;->convertTo2DPosX(Landroid/content/Context;F)I

    move-result v3

    iget v4, p3, Landroid/graphics/RectF;->top:F

    invoke-static {p0, v4}, Lcom/nemustech/regina/RUtils;->convertTo2DPosY(Landroid/content/Context;F)I

    move-result v4

    iget v5, p3, Landroid/graphics/RectF;->right:F

    invoke-static {p0, v5}, Lcom/nemustech/regina/RUtils;->convertTo2DPosX(Landroid/content/Context;F)I

    move-result v5

    iget p3, p3, Landroid/graphics/RectF;->bottom:F

    .end local p3
    invoke-static {p0, p3}, Lcom/nemustech/regina/RUtils;->convertTo2DPosY(Landroid/content/Context;F)I

    move-result p0

    .end local p0
    invoke-direct {p2, v3, v4, v5, p0}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 661
    .local p2, rect2:Landroid/graphics/Rect;
    const/16 p0, 0x64

    const/4 p3, 0x0

    const/4 v3, 0x0

    const/16 v4, 0xff

    invoke-static {p0, p3, v3, v4}, Landroid/graphics/Color;->argb(IIII)I

    move-result p0

    invoke-virtual {v2, p0}, Landroid/graphics/Paint;->setColor(I)V

    .line 662
    invoke-virtual {v1, p2, v2}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 663
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide p2

    .line 664
    .local p2, fileno:J
    invoke-static {p2, p3}, Ljava/lang/Long;->toString(J)Ljava/lang/String;

    move-result-object p0

    .line 665
    .local p0, filename:Ljava/lang/String;
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p2

    .end local p2           #fileno:J
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    .end local p1
    const-string p3, "@"

    invoke-virtual {p1, p3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result p1

    add-int/lit8 p1, p1, 0x1

    invoke-virtual {p2, p1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p1

    .line 666
    .local p1, head:Ljava/lang/String;
    const-string p2, "sdcard/%s_%s.png"

    const/4 p3, 0x2

    new-array p3, p3, [Ljava/lang/Object;

    const/4 v1, 0x0

    aput-object p1, p3, v1

    .end local v1           #canvas:Landroid/graphics/Canvas;
    const/4 p1, 0x1

    aput-object p0, p3, p1

    .end local p1           #head:Ljava/lang/String;
    invoke-static {p2, p3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    .end local p0           #filename:Ljava/lang/String;
    sget-object p1, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/4 p2, 0x1

    invoke-static {p0, v0, p1, p2}, Lcom/nemustech/tiffany/world/TFUtils;->saveBitmapToFile(Ljava/lang/String;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;I)Z

    .line 667
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 668
    return-void
.end method

.method public static printSystemProperties()V
    .locals 7

    .prologue
    .line 274
    invoke-static {}, Ljava/lang/System;->getProperties()Ljava/util/Properties;

    move-result-object v2

    .line 275
    .local v2, p:Ljava/util/Properties;
    invoke-virtual {v2}, Ljava/util/Properties;->keys()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, e:Ljava/util/Enumeration;,"Ljava/util/Enumeration<Ljava/lang/Object;>;"
    :goto_0
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v4

    if-eqz v4, :cond_0

    .line 276
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 277
    .local v1, key:Ljava/lang/String;
    invoke-virtual {v2, v1}, Ljava/util/Properties;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    .line 278
    .local v3, value:Ljava/lang/Object;
    const-string v4, "RUtils"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "KEY="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    check-cast v1, Ljava/lang/String;

    .end local v1           #key:Ljava/lang/String;
    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " VALUE="

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    check-cast v3, Ljava/lang/String;

    .end local v3           #value:Ljava/lang/Object;
    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    const/4 v6, 0x1

    invoke-static {v4, v5, v6}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    goto :goto_0

    .line 280
    :cond_0
    return-void
.end method

.method private static prvConverTo2DSize(Landroid/content/Context;F)F
    .locals 1
    .parameter "c"
    .parameter "size"

    .prologue
    .line 135
    invoke-static {p0}, Lcom/nemustech/regina/RUtils;->getScreenWidthAvailable(Landroid/content/Context;)I

    move-result v0

    int-to-float v0, v0

    mul-float/2addr v0, p1

    return v0
.end method

.method public static reduceBitmap(Landroid/graphics/Bitmap;III)Landroid/graphics/Bitmap;
    .locals 3
    .parameter "src"
    .parameter "reduceRatio"
    .parameter "dstWidth"
    .parameter "dstHeight"

    .prologue
    .line 568
    const/4 v1, 0x0

    .line 569
    .local v1, resizedBitmap:Landroid/graphics/Bitmap;
    new-instance v0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v0}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 570
    .local v0, options:Landroid/graphics/BitmapFactory$Options;
    iput p1, v0, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 571
    const/4 v2, 0x0

    invoke-static {p0, p2, p3, v2}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 572
    return-object v1
.end method

.method public static removeWallpaperFiles(Landroid/content/Context;I)Z
    .locals 7
    .parameter "c"
    .parameter "workspaceUID"

    .prologue
    const/4 v6, 0x0

    .line 183
    const/4 v0, 0x0

    .line 184
    .local v0, res:Z
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->getWallpaperFileName(Landroid/content/Context;I)Ljava/lang/String;

    move-result-object v1

    .line 185
    .local v1, wallpaperFileName:Ljava/lang/String;
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v3

    if-lez v3, :cond_0

    .line 186
    const-string v3, "RUtils"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "[removeWallpaper()]wallpaperFileName="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 187
    if-eqz v1, :cond_1

    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    move-result v3

    move v0, v3

    .line 189
    :goto_0
    const-string v3, ".png"

    const-string v4, "_4.png"

    invoke-virtual {v1, v3, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v2

    .line 190
    .local v2, wallpaperThumbFileName:Ljava/lang/String;
    const-string v3, "RUtils"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "[removeWallpapers()]wallpaperThumbFileName="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 191
    if-eqz v2, :cond_2

    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/io/File;->delete()Z

    move-result v3

    move v0, v3

    .line 194
    .end local v2           #wallpaperThumbFileName:Ljava/lang/String;
    :cond_0
    :goto_1
    return v0

    :cond_1
    move v0, v6

    .line 187
    goto :goto_0

    .restart local v2       #wallpaperThumbFileName:Ljava/lang/String;
    :cond_2
    move v0, v6

    .line 191
    goto :goto_1
.end method

.method public static removeWallpaperThumb(Landroid/content/Context;I)Z
    .locals 4
    .parameter "c"
    .parameter "workspaceUID"

    .prologue
    .line 199
    invoke-static {p0, p1}, Lcom/nemustech/regina/RUtils;->getWallpaperFileName(Landroid/content/Context;I)Ljava/lang/String;

    move-result-object v0

    .line 200
    .local v0, wallpaperFileName:Ljava/lang/String;
    if-eqz v0, :cond_0

    .line 201
    const-string v1, ".png"

    const-string v2, "_4.png"

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    .line 202
    const-string v1, "RUtils"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "[removeWallpaperThumb()]wallpaperFileName="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 203
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    move-result v1

    .line 205
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public static saveChildBitmapOfViewGroup(Landroid/view/ViewGroup;)V
    .locals 9
    .parameter "vg"

    .prologue
    const/4 v8, 0x1

    .line 640
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getChildCount()I

    move-result v1

    .line 641
    .local v1, cnt:I
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-ge v2, v1, :cond_0

    .line 642
    invoke-virtual {p0, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    .line 643
    .local v3, v:Landroid/view/View;
    invoke-virtual {v3, v8}, Landroid/view/View;->setDrawingCacheEnabled(Z)V

    .line 644
    invoke-virtual {v3}, Landroid/view/View;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 645
    .local v0, bmp:Landroid/graphics/Bitmap;
    const-string v4, "sdcard/%02d.png"

    new-array v5, v8, [Ljava/lang/Object;

    const/4 v6, 0x0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    aput-object v7, v5, v6

    invoke-static {v4, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    invoke-static {v4, v0, v5, v8}, Lcom/nemustech/tiffany/world/TFUtils;->saveBitmapToFile(Ljava/lang/String;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap$CompressFormat;I)Z

    .line 641
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 647
    .end local v0           #bmp:Landroid/graphics/Bitmap;
    .end local v3           #v:Landroid/view/View;
    :cond_0
    return-void
.end method

.method public static setInitIconSize(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    .line 65
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f060068

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 66
    .local v0, width:I
    sput v0, Lcom/nemustech/regina/RUtils;->sIconSize:I

    .line 67
    return-void
.end method

.method public static setToDefaluts(Landroid/content/Context;Landroid/content/SharedPreferences$Editor;)Z
    .locals 6
    .parameter "context"
    .parameter "sharedEditor"

    .prologue
    const/4 v5, 0x1

    .line 589
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "/data/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "com.nemustech.regina"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "/databases/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "regina_launcher.db"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 592
    .local v1, destPath:Ljava/lang/String;
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 593
    .local v0, destFile:Ljava/io/File;
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 594
    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    .line 596
    :try_start_0
    invoke-virtual {v0}, Ljava/io/File;->createNewFile()Z
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 603
    :cond_0
    :goto_0
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getDataDirectory()Ljava/io/File;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "/data/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "com.nemustech.regina"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "/files/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 605
    const/4 v3, 0x0

    invoke-static {v1, v3}, Lcom/nemustech/regina/RUtils;->deleteFiles(Ljava/lang/String;Ljava/io/FilenameFilter;)V

    .line 607
    const-string v3, "regina.launcher.restart"

    invoke-interface {p1, v3, v5}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    .line 608
    const-string v3, "regina.launcher.settodefaults"

    invoke-interface {p1, v3, v5}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    .line 609
    invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 611
    return v5

    .line 597
    :catch_0
    move-exception v2

    .line 598
    .local v2, e:Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public static setTouchedFaceColor(Lcom/nemustech/tiffany/world/TFModel;Lcom/nemustech/regina/TouchedColor;)V
    .locals 3
    .parameter "model"
    .parameter "color"

    .prologue
    const/high16 v1, 0x3f80

    .line 210
    iget v0, p1, Lcom/nemustech/regina/TouchedColor;->mRedMask:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    iget v0, p1, Lcom/nemustech/regina/TouchedColor;->mGreenMask:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    iget v0, p1, Lcom/nemustech/regina/TouchedColor;->mBlueMask:F

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    .line 211
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFModel;->unsetColorMasking()V

    .line 214
    :goto_0
    return-void

    .line 213
    :cond_0
    iget v0, p1, Lcom/nemustech/regina/TouchedColor;->mRedMask:F

    iget v1, p1, Lcom/nemustech/regina/TouchedColor;->mGreenMask:F

    iget v2, p1, Lcom/nemustech/regina/TouchedColor;->mBlueMask:F

    invoke-virtual {p0, v0, v1, v2}, Lcom/nemustech/tiffany/world/TFModel;->setColorMasking(FFF)V

    goto :goto_0
.end method

.method public static showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;
    .locals 1
    .parameter "c"
    .parameter "str"

    .prologue
    .line 348
    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;I)Landroid/widget/Toast;

    move-result-object v0

    return-object v0
.end method

.method public static showToast(Landroid/content/Context;Ljava/lang/String;I)Landroid/widget/Toast;
    .locals 1
    .parameter "c"
    .parameter "str"
    .parameter "duration"

    .prologue
    .line 352
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    if-nez v0, :cond_1

    .line 353
    invoke-static {p0, p1, p2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    sput-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    .line 359
    :goto_0
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    invoke-virtual {v0}, Landroid/widget/Toast;->getView()Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/View;->getWindowVisibility()I

    move-result v0

    if-nez v0, :cond_0

    .line 360
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    invoke-virtual {v0}, Landroid/widget/Toast;->cancel()V

    .line 363
    :cond_0
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 367
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    return-object v0

    .line 355
    :cond_1
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    invoke-virtual {v0, p1}, Landroid/widget/Toast;->setText(Ljava/lang/CharSequence;)V

    .line 356
    sget-object v0, Lcom/nemustech/regina/RUtils;->mToast:Landroid/widget/Toast;

    invoke-virtual {v0, p2}, Landroid/widget/Toast;->setDuration(I)V

    goto :goto_0
.end method

.method public static toDip(I)F
    .locals 2
    .parameter "pixel"

    .prologue
    .line 555
    int-to-float v0, p0

    const/high16 v1, 0x4000

    mul-float/2addr v0, v1

    const/high16 v1, 0x4040

    div-float/2addr v0, v1

    return v0
.end method

.method public static toPixel(Landroid/content/Context;F)I
    .locals 3
    .parameter "c"
    .parameter "dip"

    .prologue
    .line 559
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    iget v0, v1, Landroid/util/DisplayMetrics;->density:F

    .line 560
    .local v0, dpi:F
    mul-float v1, p1, v0

    const/high16 v2, 0x3f00

    add-float/2addr v1, v2

    float-to-int v1, v1

    return v1
.end method
